from rich.progress import Progress, BarColumn, TextColumn
import time

with Progress() as progress:
    # 多任务进度条
    task1 = progress.add_task("下载文件", total=100, bar_width=50)
    task2 = progress.add_task("数据处理", total=250, bar_width=20)
    
    while not progress.finished:
        # 更新进度
        progress.update(task1, advance=1, description="下载中...")
        progress.update(task2, advance=3, description="处理中...")
        time.sleep(0.1)
    
    # 完成提示
    progress.console.print(
        "[bold green]所有任务完成！[/bold green]",
        style="blink"
    )